import {useRoute, useRouter} from "vue-router";

// 日志打印
export function log(content: any, key: string = "LOG_START") {
    console.log(`============${key}=============`);
    console.error(content);
    console.log("----------- LOG_END --------------");
}

// 加密
export function encode(str: string) {
    return window.encodeURIComponent(str);
}

// 解密
export function decode(str: string) {
    return window.decodeURIComponent(str);
}

// 返回login
export function goLogin() {
    const route = useRoute();
    const router = useRouter();
    console.log(route)
    console.log(router)
}